package com.ggy.tuibi.Schedu;

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class DaShengQuWanSchedu {
    public static void main(String[] args) {
        DaShengQuWanSchedu service = new DaShengQuWanSchedu();
        ExecutorService executorService = Executors.newCachedThreadPool();
        List<Runnable> taskList = new ArrayList<>();
        for (int i = 0; i < 500; i++) {
            taskList.add(() -> service.huiyuanjiangl());
        }
        for (Runnable runnable : taskList) {
            executorService.submit(runnable);
        }

        executorService.shutdown();
    }

    private void xiaji(){
        Map<String,Object> bodyMap=new HashMap<>();
        bodyMap.put("user_id","SNu6OeojX5AUbc9Ja3UDu7G33ePBrNb6");
        bodyMap.put("machine_id","20230101062000556");
        bodyMap.put("machine_alias","F40843AB00D9B5");
        bodyMap.put("rand","562310");
        bodyMap.put("obtainCoin","0");
        bodyMap.put("message","9");
        bodyMap.put("user_code","19459");
        bodyMap.put("index","0");
        bodyMap.put("machine_types","3");
        bodyMap.put("machine_position","1");

        HttpResponse response = HttpUtil.createPost("http://az.ttle123.com/DaShengQuWan_Web_AZ/doll_WanShengYe.do?mapStr=" + JSONUtil.toJsonStr(bodyMap)).execute();
        System.out.println(response.body());
    }

    private void huiyuanjiangl(){
        HttpResponse response = HttpUtil.createGet("http://az.ttle123.com/DaShengQuWan_Web_AZ/userIndex_updateReceiveRewards.do?user_id=SNu6OeojX5AUbc9Ja3UDu7G33ePBrNb6&loginToken=Wi4c9cyBr5qJtfy9&type=1&join_id=15").execute();
        System.out.println(response.body());

    }
}
